<style>
    textarea{
        resize: none;
    }
	.btn_box{
		    width: 100px;
    height: 40px;
    text-align: center;
    color: #fff;
    background: #26c17b;
    border: none;
    outline: none;
    cursor: pointer;
    display: block;
		}
</style>
<!-- 内容 -->
<div id="right_box">
<div class="right_a">
            <a href="/empress/wechart.php"><span class="right_box1 set_menu"><div class="btn_box">自定义菜单</div></span></a>
            <a href="/empress/wechart.php?action=subscribe"><span class="right_box1 set_menu" ><div class="btn_box">首次关注设置</div></span></a>
            <a href="/empress/wechart.php?action=set_token"><span class="right_box1 set_menu"><div class="btn_box">微信接口配置</div></span></a>
            <a href="/empress/wechart.php?action=material"><span class="right_box1 set_menu" style="border:1px solid #fff"><div class="btn_box">图文消息管理</div></span></a>
            <a href="/empress/wechart.php?action=option_url"><span class="right_box1 set_menu"><div class="btn_box">自定义URL</div></span></a>
 </div>
<link href='/static/adm/css/main.css' rel='stylesheet' type='text/css' />
<link href='/static/adm/css/global.css' rel='stylesheet' type='text/css' />
<link href='/static/adm/css/wechat.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/static/adm/js/jquery.min.js'></script>
<script type='text/javascript' src='/static/adm/js/global.js'></script>
<script type='text/javascript' src='/static/adm/js/wechat.js?<?php echo time();?>'></script>
<link href='/static/adm/operamasks/operamasks-ui.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/static/adm/operamasks/operamasks-ui.min.js'></script>
<script type='text/javascript' src='/static/adm/masonry/masonry.min.js'></script>
<script language="javascript">$(window).load(wechat_obj.material_init);</script>
	<div class="wrap">
<div id="material" class="r_con_wrap">
	<div class="list">
		<div class="item first_item">
		<div>
		<div><a href="/empress/wechart.php?action=material&d=add&type=0"></a></div>
		<a href="/empress/wechart.php?action=material&d=add&type=0">+单图文消息</a>
		</div>
		<div class="multi">
		<div><a href="/empress/wechart.php?action=material&d=add&type=1"></a></div>
		<a href="/empress/wechart.php?action=material&d=add&type=1">+多图文消息</a>
		</div>
		</div>
		<div class="clear" ></div>
        <?php 
		foreach($resLists as $k=>$r){
		if(empty($r['resSub'])){
			$n=0;
		}else{
			$n=count($r['resSub']);
		}
		if($n>0){
		?>
        <div class="item multi masonry-brick">
              <div class="time">2013-12-01</div>
              <div class="first" id="multi_msg_0">
                  <div class="info">
                      <div class="img">
                          <?php if(empty($r['title_pic_url'])){?>
                          封面图片
                          <?php }else{?>
                          <img src="<?php echo $r['title_pic_url'];?>">
                          <?php }?>
                      </div>
                      <div class="title"><?php echo $r['title'];?></div>
                  </div>
                  <input type="hidden" name="Title[]" value="">
                  <input type="hidden" name="Url[]" value="">
                  <input type="hidden" name="ImgPath[]" value="">
              </div>
              <?php foreach($r['resSub'] as $kk=>$rr){?>
                  <div class="list">
                      <div class="info">
                          <div class="title"><?php echo $rr['title'];?></div>
                          <div class="img">
                           <?php if(empty($rr['title_pic_url'])){?>
                          封面图片
                          <?php }else{?>
                          <img src="<?php echo $rr['title_pic_url'];?>">
                          <?php }?>
                          </div>
                      </div>
                  </div>
              <?php }?>
              <div class="mod_del">
                  <div class="mod"><a href="/empress/wechart.php?action=material&d=edit&type=1&id=<?php echo $r['id']?>"><img src="/static/adm/images/mod.gif"></a></div>
                  <div class="del"><a href="/empress/wechart.php?action=material&do_action=wechat.material_del&id=<?php echo $r['id']?>" onClick="if(!confirm(&#39;删除后不可恢复，继续吗？&#39;)){return false};"><img src="/static/adm/images/del.gif"></a></div>
                  <div style="clear:both;"></div>
              </div>
          </div>
         <?php }else{?>
                <div class="item one masonry-brick">
                    <div class="title"><?php echo $r['title'];?></div>
                    <div><?php echo date("Y-m-d",$r['time_add']);?></div>
                    <div class="img">
                     <?php if(empty($r['title_pic_url'])){?>
                          封面图片
                          <?php }else{?>
                          <img src="<?php echo $r['title_pic_url'];?>">
                          <?php }?>
                    </div>
                    <div class="txt"><?php echo $r['contents'];?></div>
                    <div class="mod_del">
                        <div class="mod"><a href="/empress/wechart.php?action=material&d=edit&id=<?php echo $r['id']?>"><img src="/static/adm/images/mod.gif"></a></div>
                        <div class="del"><a href="/empress/wechart.php?action=material&do_action=wechat.material_del&id=<?php echo $r['id']?>" onClick="if(!confirm(&#39;删除后不可恢复，继续吗？&#39;)){return false};"><img src="/static/adm/images/del.gif"></a></div>
                        <div class="clear" style="height:auto; float:inherit; padding:0px;" ></div>
                    </div>
                </div>
        <?php }?>
        <?php }?>
	</div>
	<div class="blank12"></div>
	<div id="turn_page">{$page}</div>
</div>
</div>
</div>